package com.tengju.bff.interfaces.covercharge.constant;

public enum OnlinePayMoneyTypeEnum {
    PAY(1,"代发"),

    QUERY(2,"查询");

    private Integer code;
    private String desc;

    OnlinePayMoneyTypeEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public Integer getCode(){
        return this.code;
    }
    public String getDesc(){
        return this.desc;
    }

    public static OnlinePayMoneyTypeEnum getOnlinePayMoneyTypeDesc (Integer code){
        for(OnlinePayMoneyTypeEnum onlinePayMoneyTypeEnum : (OnlinePayMoneyTypeEnum.values())){
            if(onlinePayMoneyTypeEnum.getCode().equals(code)){//如果传入的code与此枚举code相同，则返回此枚举
                return onlinePayMoneyTypeEnum;
            }
        }
        return null;
    }
}
